﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace mscook.core.domain
{
    public class ResourceType:Entity
    {
        public virtual ResourceType ParentType
        {
            set;
            get;
        }
        [Required(ErrorMessage = "名称必填")]
        [StringLength(16, MinimumLength = 1, ErrorMessage = "名称必须为1-16位")]
        public virtual string Name
        {
            set;
            get;
        }

        [Required(ErrorMessage = "所属资源必填")]
        public virtual PurchasedCategory ResourceCategory
        {
            set;
            get;
        }
    }
}
